home *** CD-ROM | disk | FTP | other *** search
- Path: grimsel.zurich.ibm.com!usenet
- From: wgk@zurich.ibm.com (Keith Whittingham)
- Newsgroups: comp.lang.c++,gnu.g++.help
- Subject: Re: Unable to compile inline functions
- Date: 3 Apr 1996 09:54:35 GMT
- Organization: IBM Research, ZRH
- Distribution: world
- Message-ID: <4jthsr$34f@grimsel.zurich.ibm.com>
- References: <4js108$pm4@ncar.ucar.edu>
- Reply-To: wgk@zurich.ibm.com
- NNTP-Posting-Host: pine.zurich.ibm.com
- X-Newsreader: IBM NewsReader/2 v1.00
-
- In <4js108$pm4@ncar.ucar.edu>, jadams@sage.cgd.ucar.edu (James Adams) writes:
- >Hello,
- >class nrifframe {
- > private:
- > // private member variables
- > int count;
- > char *filename;
- > FILE *infile;
- > header *head;
- > pix48 *data;
- > public:
- > // public member functions
- > nrifframe ();
- > ~nrifframe ();
- > bool initialize (char *name);
- > int getwidth ();
- > int getheight ();
- >};
- >
- >I have defined the inline functions (in another file) as such:
- >
- >inline int nrifframe::getheight()
- >{
- > return(this->head->y);
- >}
- >
- The compiler doesn't know it's inline... Try either:
-
- public:
- inline int getheight() { return head->y; }
-
- or put the inline defs below the class definition in the same file.
-
- Keith
-
-